"""
类的成员方法
"""
class Student:
    # 成员属性
    name = None         # 姓名
    age = None          # 年龄

    # 成员方法
    def say_hi(self):
        print(f"大家好，我是{self.name},今年{self.age}岁")
    def say_hi2(self,msg):
        print(f"大家好，我是{self.name},今年{self.age}岁,我想说：{msg}")


# 构建对象
stu1 = Student()
stu1.name = "张大帅"
stu1.age = 20
stu1.say_hi()
stu2 = Student()
stu2.name = "李四"
stu2.age = 18
stu2.say_hi()
stu2.say_hi2("我很帅")